package com.leo.train.business.controller.web;

import com.leo.train.business.dto.SeatSellDto;
import com.leo.train.business.service.DailySeatService;
import com.leo.train.business.vo.SeatSellVo;
import com.leo.train.common.resp.CommonResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/seat-sell")
public class SeatSellController {
    @Autowired
    private DailySeatService dailySeatService;
    @GetMapping("/query")
    public CommonResp<List<SeatSellVo>> query(@Valid SeatSellDto seatSellDto){
        List<SeatSellVo> list = dailySeatService.querySeatSell(seatSellDto);
        return new CommonResp<>(list);
    }
}
